package com.supersoul.myself.dao;

import com.supersoul.myself.entity.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CommentDao extends JpaRepository<Comment, String> {
    Page<Comment> findByBlogIdAndReplyIdIsNull(String blogId,Pageable pageable);

    List<Comment> findByBlogIdAndReplyIdIsNotNull(String blogId);

    List<Comment> findByReplyRootId(String replyRootId, Sort sort);
}
